//
//  BshopAminTableViewCell.m
//  DistributorAB
//
//  Created by 主事丫环 on 2019/5/22.
//  Copyright © 2019 主事丫环. All rights reserved.
//

#import "BshopAminTableViewCell.h"

@implementation BshopAminTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)refashwithmodel:(ProsModel *)model{
    
    
    NSInteger ind = [model.state integerValue];
    //    状态(0代付款1待发货2待收货3待评价4已评价
    switch (ind) {
        case 0:
        {
            self.stateLb.text =@"待付款";
        }
            break;
        case 1:
        {
            self.stateLb.text =@"待发货";
            
        }
            break;
        case 2:
        {
            self.stateLb.text =@"待收货";
            
        }
            break;
        case 3:
        {
            self.stateLb.text =@"待评价";
            
        }
            break;
        case 4:
        {
            self.stateLb.text =@"已评价";
            
        }
            break;
            
        case -1:
        {
            self.stateLb.text =@"已取消";
            
        }
            break;
            
            
        default:
            break;
    }
    
    
    self.orderLb.text = [NSString stringWithFormat:@"订单号: %@",model.order_number];
    NSString *timeste = [[model.create_time1 substringFromIndex:5] substringToIndex:2];
    NSString *timeste2 = [[model.create_time1 substringFromIndex:8] substringToIndex:2];
    
    self.timeLb.text =[NSString stringWithFormat:@"%@月%@日",timeste,timeste2];
    [self.myimage sd_setImageWithURL:[NSURL URLWithString:model.product_pic] placeholderImage:defaultImg];
    
    self.priceLb.text = [NSString stringWithFormat:@"¥%@",model.product_price];
    self.countLB.text = [NSString stringWithFormat:@"X%@",model.pro_count];
    self.mytitiLb.text = [NSString stringWithFormat:@"%@",model.product_name];
    
}

@end
